#By Kuratsune

EAPI=7

inherit autotools git-r3 linux-info xdg-utils

DESCRIPTION="GNOME battery benchmark tool."
HOMEPAGE="https://gitlab.gnome.org/GNOME/gnome-battery-bench"
MY_AUTHOR="GNOME team"
EGIT_REPO_URI="https://gitlab.gnome.org/GNOME/gnome-battery-bench.git"

EGIT_BRANCH="master"
KEYWORDS="~x86 ~amd64"


LICENSE="GPL-2"
SLOT="0"

CONFIG_CHECK="
            ~INPUT_UINPUT
            "

DEPEND=">=dev-libs/glib-2.0
        virtual/libudev
        x11-libs/libXtst
        >=x11-libs/gtk+-3.0
        dev-libs/json-glib
        x11-libs/libXi
        sys-auth/polkit
        app-text/asciidoc
        app-text/xmlto"

RDEPEND=">=dev-libs/glib-2.0
        virtual/libudev
        x11-libs/libXtst
        >=x11-libs/gtk+-3.0
        dev-libs/json-glib
        x11-libs/libXi
        sys-auth/polkit"


src_prepare() {
	default
	eautoreconf
}

pkg_post_install() {
    xdg_desktop_database_update 
    xdg_mimeinfo_database_update

    einfo "uinput (user space input drivers) should be built-in your kernel, or the kernel module (uinput) should be loaded, or ${PN} will crash on startup. \"# modprobe uinput\" as root should do the trick."
}
